package com.sky.controller.user;

import com.sky.entity.ShoppingCart;
import com.sky.result.Result;
import com.sky.service.ShoppingCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/user/shoppingCart")
@RestController("ShoppingCartController")
public class ShoppingCartController {

    @Autowired
    ShoppingCartService shoppingCartService;
    @GetMapping("/list")
    public Result<List<ShoppingCart>> queryShoppingCar(){
        List<ShoppingCart> list =  shoppingCartService.show();
        return Result.success(list);
    }
    @PostMapping("/add")
    public Result addProduct(){
        return Result.success();
    }
}
